package oop.day01;


public class GetSum
{
    public static void main(String[] args)
    {
        int sum = 0;
        for (int i = 2 ; i <= 100; i++)
        {
            if( i % 2 == 0)
            {
                sum += i;
            }
        }
        System.out.println(sum);
        test1();
        // 可变数组
        tes3(1,3,4,5,65,6,7,87,8,8,9,9,93,31,4,3,34,34,1);
    }


    public static void test1()
    {
        // 123
        for (int num = 100 ; num <= 999;num++)
        {
            int b = num /100;
            int s = num % 100 /10;
            int g = num % 100 % 10;
            int sum = b*b*b + s*s*s + g*g*g;
            if( sum == num)
            {
                System.out.println(sum);
            }
        }

    }

    public static void tes3(int...args)
    {
        for (int i = 0 ; i < args.length ; i++ )
        {
            System.out.println(args[i]);
        }
    }

}
